gtk-demo: Add shadertoy demo
authorAlexander Larsson <alexl@redhat.com>
Mon, 7 Sep 2020 13:32:22 +0000 (15:32 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 8 Sep 2020 07:56:25 +0000 (09:56 +0200)
commit0092a08dfcdf2cfd4db7664ebc330775bf631e5e
tree7ec61d1f22c4d8fcf0f8e41985a2d017e437c21e
parent350051c56e203217afe704a982f2be61976ca652
gtk-demo: Add shadertoy demo

This adds a small demo of using OpenGL shaders, it renders a quad
over the entire widget with a custom fragment shader. The coordinates
and the uniform names are compatible with the ones on shadertoy.com
(although some features, like texture inputs are missing currently).

The default shader in the demo is
https://www.shadertoy.com/view/wsjBD3 which is CC0, so it is
redistributable by Gtk+ (most other shaders are CC-BY-NC-SA which
isn't obviously compatible). I also added a set of buttons loading
a few other CC0 shaders I found.
demos/gtk-demo/alienplanet.glsl [new file with mode: 0644]
demos/gtk-demo/cogs.glsl [new file with mode: 0644]
demos/gtk-demo/demo.gresource.xml
demos/gtk-demo/glowingstars.glsl [new file with mode: 0644]
demos/gtk-demo/gtkshadertoy.c [new file with mode: 0644]
demos/gtk-demo/gtkshadertoy.h [new file with mode: 0644]
demos/gtk-demo/mandelbrot.glsl [new file with mode: 0644]
demos/gtk-demo/meson.build
demos/gtk-demo/neon.glsl [new file with mode: 0644]
demos/gtk-demo/shadertoy.c [new file with mode: 0644]